//
//  WZOutProceduleCell.m
//  WZEfengAndEtong
//
//  Created by wanzhao on 2016/9/29.
//  Copyright © 2016年 wanzhao. All rights reserved.
//

#import "WZOutProceduleCell.h"
#import "WZOutProceduleList.h"

@interface WZOutProceduleCell ()

@property (weak, nonatomic) IBOutlet UIImageView *status;

@property (weak, nonatomic) IBOutlet UILabel *name;

@end

@implementation WZOutProceduleCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}


- (void)setList:(WZOutProceduleList *)list {
    
    _list = list;
    self.name.text = list.modelName;
    if ([list.runState isEqualToString:@"运行中"]) {
        
        self.status.image = [UIImage imageNamed:@"yuxingzhong"];
        self.status.hidden = NO;
        
    } else if ([list.runState isEqualToString:@"异常终止"] || [list.runState isEqualToString:@"已中止"]) {
        
        self.status.image = [UIImage imageNamed:@"yichangzhongzhi"];
        self.status.hidden = NO;
        
    } else if ([list.runState isEqualToString:@"已结束"]) {
        
        self.status.image = [UIImage imageNamed:@"yichangzhongzhi"];
        self.status.hidden = NO;
        
    } else if ([list.runState isEqualToString:@"已接收"]) {
        
        self.status.image = [UIImage imageNamed:@"yichangzhongzhi"];
        self.status.hidden = NO;
        
    } else if ([list.runState isEqualToString:@"已停用"]) {
        
        self.status.image = [UIImage imageNamed:@"yichangzhongzhi"];
        self.status.hidden = NO;
        
    } else if ([list.runState isEqualToString:@"已暂停"]) {
        
        self.status.image = [UIImage imageNamed:@"yichangzhongzhi"];
        self.status.hidden = NO;
        
    } else {
        
        self.status.hidden = YES;
    }
}

@end
